package com.medicalservice.enums;

public enum ResultCodeEnum {
    SUCCESS("200", "成功"),

    PARAM_ERROR("400", "参数异常"),
    TOKEN_INVALID_ERROR("401", "无效的token"),
    TOKEN_CHECK_ERROR("401", "token验证失败，请重新登录"),
    PARAM_LOST_ERROR("4001", "参数缺失"),

    SYSTEM_ERROR("500", "系统异常"),
    USER_EXIST_ERROR("5001", "用户名已存在"),
    USER_NOT_LOGIN("5002", "用户未登录"),
    USER_ACCOUNT_ERROR("5003", "账号或密码错误"),
    USER_NOT_EXIST_ERROR("5004", "用户不存在"),
    PARAM_PASSWORD_ERROR("5005", "原密码输入错误"),

    // 预约系统相关错误码
    APPOINTMENT_NOT_FOUND("7001", "预约记录不存在"),
    APPOINTMENT_DOCTOR_REQUIRED("7002", "请选择医生"),
    APPOINTMENT_DATE_REQUIRED("7003", "请选择预约日期"),
    APPOINTMENT_TIME_REQUIRED("7004", "请选择预约时间"),
    APPOINTMENT_TIME_CONFLICT("7005", "该时间段已被预约"),
    APPOINTMENT_TIME_PAST("7006", "不能预约过去的时间"),
    APPOINTMENT_CANCEL_DEADLINE("7007", "距离预约时间不足24小时，无法取消"),
    APPOINTMENT_STATUS_INVALID("7008", "预约状态无效，无法执行该操作"),
    APPOINTMENT_ALREADY_CANCELLED("7009", "预约已被取消"),
    APPOINTMENT_ALREADY_COMPLETED("7010", "预约已完成"),
    APPOINTMENT_CONTACT_REQUIRED("7011", "联系电话不能为空"),
    APPOINTMENT_PROBLEM_REQUIRED("7012", "问题描述不能为空"),
    APPOINTMENT_DURATION_INVALID("7013", "预约时长必须大于0"),
    APPOINTMENT_DATE_TOO_FAR("7014", "不能预约3个月以后的时间"),
    APPOINTMENT_TIME_OUT_OF_HOURS("7015", "预约时间必须在工作时间内（9:00-18:00）"),

    DOCTOR_NOT_FOUND("7101", "医生不存在"),
    DOCTOR_NOT_AVAILABLE("7102", "医生在该时间段不可预约"),
    DOCTOR_SCHEDULE_CONFLICT("7103", "医生时间安排冲突"),

    FEEDBACK_CONTENT_REQUIRED("7201", "反馈内容不能为空"),
    FEEDBACK_TYPE_REQUIRED("7202", "反馈类型不能为空"),
    FEEDBACK_NOT_FOUND("7203", "反馈记录不存在"),
    ;

    public String code;
    public String msg;

    ResultCodeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
